<?php 

include '../../function.php';
//通过$_FILES接收数据
// var_dump($_FILES);exit;
//判断大小
//上传的目录

include './Upload.class.php';

$config = array(
	'path'=>'./aa/',
	);

$obj = new Upload($config);

$res = $obj ->save();

if(!$res){
	echo $obj->error;
}

// foreach ($_FILES['file']['name'] as $k => $v) {
	
// 	$upload = "./Upload/".date('Y-m-d').'/';
// 	$upload = "./Upload/";
// 	//不存在就创建目录
// 	is_dir($upload) || mkdir($upload,0777,true);
// 	//获取文件的后缀
// 	$arr = explode('.',$v);
// 	//获取数组最后一个
// 	$str = end($arr);
// 	//生成一个唯一的ID
// 	$name = uniqid();
// 	//组文件名
// 	$filename =$name.".".$str;
// 	//移动临时文件
// 	move_uploaded_file($_FILES['file']['tmp_name'][$k], $upload.$filename);
// }
	















 ?>